package model.converters;

import utilities.Key;
import model.AbstractModel;

import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;

public class ModelConverter implements Converter {

	public boolean canConvert(Class clazz) {
		return AbstractModel.class.isAssignableFrom(clazz);
	}

	public void marshal(Object obj, HierarchicalStreamWriter writer,
			MarshallingContext context) {
		
		AbstractModel model = (AbstractModel) obj;
		
		Key key = model.getKey();
		
	}

	public Object unmarshal(HierarchicalStreamReader reader,
			UnmarshallingContext context) {
		
		
		return null;
	}

}
